//
//  UIImage+ImageScale.m
//  Image
//
//  Created by kang on 2018/7/12.
//  Copyright © 2018年 fuyunhe. All rights reserved.
//

#import "UIImage+ImageScale.h"

@implementation UIImage (ImageScale)

-(UIImage *)imageScaleSize:(CGSize)size{
    
    UIGraphicsBeginImageContext(size);
    
    [self drawInRect:CGRectMake(0, 0, size.width, size.height)];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    
    UIGraphicsEndImageContext();
    
    return image;
}


@end
